package com.sq.partner.manager.service.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import com.sq.partner.manager.dao.TradeFeeCovDao;
import com.sq.partner.manager.mybatis.model.NlifeCov;
import com.sq.partner.manager.mybatis.model.TradeFeeCov;
import com.sq.partner.manager.service.TreddeFeeCovService;
import com.sq.partner.manager.util.LogUtil;
@Service
public class TreddeFeeCovServiceImpl implements
		TreddeFeeCovService {
	private static Logger logger = LogUtil.getLog(TreddeFeeCovServiceImpl.class);

	@Resource
	private TradeFeeCovDao tradeFeeCovDao;

	@Override
	public Integer getMaxId() {
		return tradeFeeCovDao.getMaxId();
	}

	@Override
	public List<TradeFeeCov> getTradeFeeCov(Map<String, Object> map)
			throws SQLException {
		return tradeFeeCovDao.getTradeFeeCov(map);
	}

	@Override
	public boolean deleteTradeCov(Map<String, Object> map){
		try {
			return tradeFeeCovDao.deleteTradeCov(map);
		} catch (Exception e) {
			logger.error(e);
			return false;
		}
	}
	@Override
	public boolean deleteTradeCov1(Map<String, Object> map) {
		try {
			return tradeFeeCovDao.deleteTradeCov1(map);
		} catch (Exception e) {
			logger.error(e);
			return false;
		}
	}

	@Override
	public boolean addTradeCov(Map<String, Object> map) throws Exception {
			return tradeFeeCovDao.addTradeCov(map);
	}

	@Override
	public Integer checkInsure(String prodCode) {
		return tradeFeeCovDao.checkInsure(prodCode);
	}

	@Override
	public String getRemark(String calDefIdAll) throws SQLException {
		return tradeFeeCovDao.getRemark(calDefIdAll);
	}

	@Override
	public List<Map<String, Object>> impNlifeCall(Map<String, Object> map)
			throws SQLException {
		return tradeFeeCovDao.impNlifeCall(map);
	}
}
